/**
 * Created by baiguiren on 1/16/17.
 */

let async =require('async');

let name;
let age;

let getName = (person, callback) => {
  name =  person.name;
  callback();
};

let getAge = (person, callback) => {
  age = person.age;
  callback();
};

async.applyEach([getName, getAge], {name: 'awk', age: 23}, () => {
  console.log('name: ' + name);
  console.log('age: ' + age);
});


async.applyEachSeries([getName, getAge], {name: 'awk', age: 23}, () => {
  console.log('name: ' + name);
  console.log('age: ' + age);
});


